package com.lc.DetailCharacter;

import android.content.Context;
import android.media.MediaPlayer;

import com.example.japaneseapp.R;

public class PronunciationCharacter {
	private Context mContext;

	public PronunciationCharacter(Context context) {
		// set up our audio player
		mContext = context;

	}

	public void play(int id) {
		MediaPlayer mediaPlayer = MediaPlayer.create(mContext, IdSoundCharacter[id]);
		mediaPlayer.setVolume(1.0f, 1.0f);
		mediaPlayer.start();
	}
	private int IdSoundCharacter[] = {R.raw.a, R.raw.i, R.raw.u, R.raw.e, R.raw.o, 
			R.raw.ka, R.raw.ki, R.raw.ku, R.raw.ke, R.raw.ko, 
			R.raw.sa, R.raw.shi, R.raw.su, R.raw.se, R.raw.so, 
			R.raw.ta, R.raw.chi, R.raw.tsu, R.raw.te, R.raw.to, 
			R.raw.na, R.raw.ni, R.raw.nu, R.raw.ne, R.raw.no, 
			R.raw.ha, R.raw.hi, R.raw.fu, R.raw.he, R.raw.ho, 
			R.raw.ma, R.raw.mi, R.raw.mu, R.raw.me, R.raw.mo, 
			R.raw.ya, 0, R.raw.yu, 0, R.raw.yo, 
			R.raw.ra, R.raw.ri, R.raw.ru, R.raw.re, R.raw.ro, 
			R.raw.wa, R.raw.wo, R.raw.n};
}
